<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>get_data_code_2d_objects [HALCON算子参考手册]</title>
<style type="text/css">
      body {
    color: #000000;
    background-color: #ffffff;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.body_main {
    margin-left: 35px;
    margin-right: 35px;
}

@media screen and (min-width:992px) {

    .body_main {
        margin-left: 10%;
        margin-right: 10%;
    }

    table.toctable {
        width: 80%
    }
}

@media screen and (min-width:1400px) {

    .body_main {
        margin-left: 15%;
        margin-right: 15%;
    }

    table.toctable {
        width: 70%
    }
}

body>div ul ul {
    margin-left: inherit;
}

a:link {
    color: #0044cc;
}

a:link,
a:visited {
    text-decoration: none;
}

a:link:hover,
a:visited:hover {
    text-decoration: underline;
}

th {
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-rendering: optimizeLegibility;
    color: #666666;
}

code {
    font-family: monospace,monospace;
}

h1 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

h2 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

hr {
    border: 0;
    border-top: solid 1px #f28d26;
}

.pre {
    display: block;
    padding-bottom: 1ex;
    font-family: monospace;
    white-space: pre;
}

pre {
    font-family: monospace, monospace;
    padding: 1ex;
    white-space: pre-wrap;
}

.toc {
    font-size: 80%;
    border-top: 1px dashed #f28d26;
    border-bottom: 1px dashed #f28d26;
    padding-top: 5px;
    padding-bottom: 5px;
}

.inv {
    margin: 0;
    border: 0;
    padding: 0;
}

.banner {
    color: #666666;
    padding-left: 1em;
}

.logo {
    background-color: white;
}

.keyboard {
    font-size: 80%;
    padding-left: 3px;
    padding-right: 3px;
    border-radius: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: #f28d26;
    background-color: #f3f3f3;
}

.warning {
    margin-top: 2ex;
    margin-bottom: 1ex;
    padding: 10px;
    text-align: center;
    border: 1px solid;
    color: #bb0000;
    background-color: #fff7f7
}

.imprint {
    margin-top: 1ex;
    font-size: 80%;
    color: #666666;
}

.imprinthead {
    font-weight: bolder;
    color: #666666;
}

.indexlink {
    text-align: right;
    padding-bottom: 5px;
}

.postscript {
    margin-top: 2ex;
    font-size: 80%;
    color: #666666
}

.evenrow {
    background-color: #e7e7ef;
    vertical-align: top;
}

.oddrow {
    background-color: #f7f7ff;
    vertical-align: top;
}

.headrow {
    background-color: #97979f;
    color: #ffffff;
    vertical-align: top;
}

.logorow {
    vertical-align: top;
}

.error {
    color: red;
}

.var {
    font-style: italic
}

.halconoperator {
    font-family: monospace, monospace;
}

span.operator {
    font-family: monospace, monospace;
}

span.procedure {
    font-family: monospace, monospace;
}

span.operation {
    font-family: monospace, monospace;
}

span.feature {
    font-family: Arial, Helvetica, Homerton, sans-serif;
}

ul {
    padding-left: 1.2em;
}

li.dot {
    list-style-type: square;
    color: #f28d26;
}

.breadcrumb {
    font-size: 80%;
    color: white;
    background-color: #062d64;
    margin-bottom: 20px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 15px;
}

.webbar {
    font-size: 80%;
    background-color: #dddddd;
    margin-top: 0px;
    margin-left: -35px;
    margin-right: -35px;
    margin-bottom: 0px;
    padding-top: 5px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 5px;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px dashed #f28d26;
    font-size: 80%;
    color: #666666;
    padding-bottom: 8px;
}

.footer .socialmedia a {
    padding-left: 7px;
}

.socialmedia {
    padding-top: 10px;
}

.copyright {
    margin-top: 19px;
}

.breadcrumb a {
    color: #ffffff;
    border-bottom: 1px solid white;
}

.breadcrumb a:link:hover,
.breadcrumb a:visited:hover {
    text-decoration: none;
    border-bottom: none;
}

.heading {
    margin-top: 1ex;
    font-size: 110%;
    font-weight: bold;
    color: #666666;
}

.text {
    color: black;
}

.example {
    font-size: 80%;
    background-color: #f3f3f3;
    border: 1px dashed #666666;
    padding: 10px;
}

.displaymath {
    display: block;
    text-align: center;
    margin-top: 1ex;
    margin-bottom: 1ex;
}

.title {
    float: left;
    padding-top: 3px;
    padding-bottom: 3px;
}

.signnote {
    font-family: Arial, Helvetica, Homerton, sans-serif;
    font-size: 80%;
    color: #666666;
    font-weight: lighter;
    font-style: italic
}

.par {
    margin-bottom: 1.5em;
}

.parhead {
    text-align: right;
}

.parname {
    float: left;
}

.pardesc {
    font-size: 85%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 2em;
}

.parcat {
    color: #666;
    font-weight: bold;
}

*[data-if=cpp],
*[data-if=c],
*[data-if=dotnet],
*[data-if=com],
*[data-if=python] {
    display: none;
}

.tabbar {
    text-align: right;
    border-bottom: 1px solid #f28d26;
    margin-bottom: 0.5em;
}

ul.tabs {
    padding-top: 3px;
    padding-bottom: 3px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 80%
}

ul.tabs li {
    padding-top: 3px;
    padding-bottom: 3px;
    display: inline;
    overflow: hidden;
    list-style-type: none;
    margin: 0;
    margin-left: 8px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

ul.tabs li.active {
    border-left: 1px solid #f28d26;
    border-right: 1px solid #f28d26;
    border-top: 1px solid #f28d26;
    border-bottom: 1px solid #fff;
}

ul.tabs li.inactive {
    background-color: #eee;
}

ul.tabs li a {
    padding-left: 5px;
    padding-right: 5px;
    color: #666;
}

ul.tabs li a:link:hover {
    text-decoration: none;
}

ul.tabs li.inactive a {
    color: #666;
}

ul.tabs li.active a {
    color: black;
}

dl.generic dd {
    margin-bottom: 1em;
}

.pari {
    color: olive;
}

.paro {
    color: maroon;
}

.comment {
    font-size: 80%;
    color: green;
    white-space: nowrap;
}

table.grid {
    border-collapse: collapse;
}

table.grid td {
    padding: 5px;
    border: 1px solid;
}

table.layout {
    border: 0px;
}

table.layout td {
    padding: 5px;
}

table.table {
    border-collapse: collapse;
}

table.table td {
    padding: 5px;
    border-left: 0px;
    border-right: 0px;
}

table.table tr:last-child {
    border-bottom: 1px solid;
}

table.table th {
    padding: 5px;
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-left: 0px;
    border-right: 0px;
}

.details_summary {
    cursor: pointer;
}

table.toctable {
    width: 100%;
}

table.toctable col:first-child {
    width: 20%;
}

table.toctable col:nth-last-child(2) {
    width: 8%;
}

table.altcolored tr:nth-child(even) {
    background-color: #f3f3f3;
}

    </style>
<!--OP_REF_STYLE_END-->
<script>
    <!--
var active_lang='hdevelop';function switchVisibility(obj,active_lang,new_lang)
{var display_style='inline';
for(var i=0;i<obj.length;i++)
{if(obj.item(i).getAttribute('data-if')==new_lang)
{obj.item(i).style.display=display_style;}
if(obj.item(i).getAttribute('data-if')==active_lang)
{obj.item(i).style.display='none';}}
return;}
function toggleLanguage(new_lang,initial)
{if(active_lang!=new_lang)
{var lis=document.getElementsByTagName('li');for(var i=0;i<lis.length;i++)
{if(lis.item(i).id=='syn-'+new_lang)
{lis.item(i).className='active';}
else
{lis.item(i).className='inactive';}}
var divs=document.getElementsByTagName('div');var spans=document.getElementsByTagName('span');switchVisibility(divs,active_lang,new_lang);switchVisibility(spans,active_lang,new_lang);if(!initial)
{setCookie("halcon_reference_language",new_lang,null,null);}
active_lang=new_lang;}
return;}
function setCookie(name,value,domain,exp_offset,path,secure)
{localStorage.setItem(name,value);}
function getCookie(name)
{return localStorage.getItem(name);}
function initialize()
{var qs=location.href.split('?')[1];var qs_lang_raw=location.href.split('interface=')[1];var qs_lang;if(qs_lang_raw)
{qs_lang=qs_lang_raw.split('#')[0];}
var cookie_lang=getCookie("halcon_reference_language");var new_lang;if((qs_lang=="hdevelop")||(qs_lang=="dotnet")||(qs_lang=="python")||(qs_lang=="cpp")||(qs_lang=="c"))
{new_lang=qs_lang;setCookie("halcon_reference_language",new_lang,null,null);}
else if((cookie_lang=="hdevelop")||(cookie_lang=="dotnet")||(cookie_lang=="python")||(cookie_lang=="cpp")||(cookie_lang=="c"))
{new_lang=cookie_lang;}
else
{new_lang="hdevelop";}
toggleLanguage(new_lang,1);return;}
-->

  </script>
</head>
<body onload="initialize();">
<div class="breadcrumb">
<br class="inv"><a href="index.html">目录</a> / <a href="toc_identification.html">Identification</a> / <a href="toc_identification_datacode.html">Data Code</a><br class="inv">
</div>
<div class="body_main">
<div class="tabbar"><ul class="tabs">
<li id="syn-hdevelop" class="active"><a href="javascript:void(0);" onclick="toggleLanguage('hdevelop')" onfocus="blur()">HDevelop</a></li>
<li id="syn-dotnet" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('dotnet')" onfocus="blur()">.NET</a></li>
<li id="syn-python" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('python')" onfocus="blur()">Python</a></li>
<li id="syn-cpp" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('cpp')" onfocus="blur()">C++</a></li>
<li id="syn-c" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('c')" onfocus="blur()">C</a></li>
</ul></div>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<!--OP_REF_HEADER_END-->
<h1 id="sec_name">
<span data-if="hdevelop" style="display:inline;">get_data_code_2d_objects</span><span data-if="c" style="display:none;">T_get_data_code_2d_objects</span><span data-if="cpp" style="display:none;">GetDataCode2dObjects</span><span data-if="dotnet" style="display:none;">GetDataCode2dObjects</span><span data-if="python" style="display:none;">get_data_code_2d_objects</span> (算子名称)</h1>
<h2>名称</h2>
<p><code><span data-if="hdevelop" style="display:inline;">get_data_code_2d_objects</span><span data-if="c" style="display:none;">T_get_data_code_2d_objects</span><span data-if="cpp" style="display:none;">GetDataCode2dObjects</span><span data-if="dotnet" style="display:none;">GetDataCode2dObjects</span><span data-if="python" style="display:none;">get_data_code_2d_objects</span></code> — Access iconic objects that were created during the search for
2D data code symbols.</p>
<h2 id="sec_synopsis">参数签名</h2>
<div data-if="hdevelop" style="display:inline;">
<p>
<code><b>get_data_code_2d_objects</b>( : <a href="#DataCodeObjects"><i>DataCodeObjects</i></a> : <a href="#DataCodeHandle"><i>DataCodeHandle</i></a>, <a href="#CandidateHandle"><i>CandidateHandle</i></a>, <a href="#ObjectName"><i>ObjectName</i></a> : )</code></p>
</div>
<div data-if="c" style="display:none;">
<p>
<code>Herror <b>T_get_data_code_2d_objects</b>(Hobject* <a href="#DataCodeObjects"><i>DataCodeObjects</i></a>, const Htuple <a href="#DataCodeHandle"><i>DataCodeHandle</i></a>, const Htuple <a href="#CandidateHandle"><i>CandidateHandle</i></a>, const Htuple <a href="#ObjectName"><i>ObjectName</i></a>)</code></p>
</div>
<div data-if="cpp" style="display:none;">
<p>
<code>void <b>GetDataCode2dObjects</b>(HObject* <a href="#DataCodeObjects"><i>DataCodeObjects</i></a>, const HTuple&amp; <a href="#DataCodeHandle"><i>DataCodeHandle</i></a>, const HTuple&amp; <a href="#CandidateHandle"><i>CandidateHandle</i></a>, const HTuple&amp; <a href="#ObjectName"><i>ObjectName</i></a>)</code></p>
<p>
<code><a href="HObject.html">HObject</a> <a href="HDataCode2D.html">HDataCode2D</a>::<b>GetDataCode2dObjects</b>(const HTuple&amp; <a href="#CandidateHandle"><i>CandidateHandle</i></a>, const HString&amp; <a href="#ObjectName"><i>ObjectName</i></a>) const</code></p>
<p>
<code><a href="HObject.html">HObject</a> <a href="HDataCode2D.html">HDataCode2D</a>::<b>GetDataCode2dObjects</b>(Hlong <a href="#CandidateHandle"><i>CandidateHandle</i></a>, const HString&amp; <a href="#ObjectName"><i>ObjectName</i></a>) const</code></p>
<p>
<code><a href="HObject.html">HObject</a> <a href="HDataCode2D.html">HDataCode2D</a>::<b>GetDataCode2dObjects</b>(Hlong <a href="#CandidateHandle"><i>CandidateHandle</i></a>, const char* <a href="#ObjectName"><i>ObjectName</i></a>) const</code></p>
<p>
<code><a href="HObject.html">HObject</a> <a href="HDataCode2D.html">HDataCode2D</a>::<b>GetDataCode2dObjects</b>(Hlong <a href="#CandidateHandle"><i>CandidateHandle</i></a>, const wchar_t* <a href="#ObjectName"><i>ObjectName</i></a>) const  <span class="signnote">
            (
            Windows only)
          </span></code></p>
</div>
<div data-if="com" style="display:none;"></div>
<div data-if="dotnet" style="display:none;">
<p>
<code>static void <a href="HOperatorSet.html">HOperatorSet</a>.<b>GetDataCode2dObjects</b>(out <a href="HObject.html">HObject</a> <a href="#DataCodeObjects"><i>dataCodeObjects</i></a>, <a href="HTuple.html">HTuple</a> <a href="#DataCodeHandle"><i>dataCodeHandle</i></a>, <a href="HTuple.html">HTuple</a> <a href="#CandidateHandle"><i>candidateHandle</i></a>, <a href="HTuple.html">HTuple</a> <a href="#ObjectName"><i>objectName</i></a>)</code></p>
<p>
<code><a href="HObject.html">HObject</a> <a href="HDataCode2D.html">HDataCode2D</a>.<b>GetDataCode2dObjects</b>(<a href="HTuple.html">HTuple</a> <a href="#CandidateHandle"><i>candidateHandle</i></a>, string <a href="#ObjectName"><i>objectName</i></a>)</code></p>
<p>
<code><a href="HObject.html">HObject</a> <a href="HDataCode2D.html">HDataCode2D</a>.<b>GetDataCode2dObjects</b>(int <a href="#CandidateHandle"><i>candidateHandle</i></a>, string <a href="#ObjectName"><i>objectName</i></a>)</code></p>
</div>
<div data-if="python" style="display:none;">
<p>
<code>def <b>get_data_code_2d_objects</b>(<a href="#DataCodeHandle"><i>data_code_handle</i></a>: HHandle, <a href="#CandidateHandle"><i>candidate_handle</i></a>: Union[int, str], <a href="#ObjectName"><i>object_name</i></a>: str) -&gt; HObject</code></p>
</div>
<h2 id="sec_description">描述</h2>
<p>该算子 <code><span data-if="hdevelop" style="display:inline">get_data_code_2d_objects</span><span data-if="c" style="display:none">get_data_code_2d_objects</span><span data-if="cpp" style="display:none">GetDataCode2dObjects</span><span data-if="com" style="display:none">GetDataCode2dObjects</span><span data-if="dotnet" style="display:none">GetDataCode2dObjects</span><span data-if="python" style="display:none">get_data_code_2d_objects</span></code> facilitates to access
iconic objects that were created during the last call of
<a href="find_data_code_2d.html"><code><span data-if="hdevelop" style="display:inline">find_data_code_2d</span><span data-if="c" style="display:none">find_data_code_2d</span><span data-if="cpp" style="display:none">FindDataCode2d</span><span data-if="com" style="display:none">FindDataCode2d</span><span data-if="dotnet" style="display:none">FindDataCode2d</span><span data-if="python" style="display:none">find_data_code_2d</span></code></a> while searching and reading the 2D data
code symbols.
Besides the name of the object (<a href="#ObjectName"><i><code><span data-if="hdevelop" style="display:inline">ObjectName</span><span data-if="c" style="display:none">ObjectName</span><span data-if="cpp" style="display:none">ObjectName</span><span data-if="com" style="display:none">ObjectName</span><span data-if="dotnet" style="display:none">objectName</span><span data-if="python" style="display:none">object_name</span></code></i></a>), the 2D data
code model (<a href="#DataCodeHandle"><i><code><span data-if="hdevelop" style="display:inline">DataCodeHandle</span><span data-if="c" style="display:none">DataCodeHandle</span><span data-if="cpp" style="display:none">DataCodeHandle</span><span data-if="com" style="display:none">DataCodeHandle</span><span data-if="dotnet" style="display:none">dataCodeHandle</span><span data-if="python" style="display:none">data_code_handle</span></code></i></a>) must be passed to
<code><span data-if="hdevelop" style="display:inline">get_data_code_2d_objects</span><span data-if="c" style="display:none">get_data_code_2d_objects</span><span data-if="cpp" style="display:none">GetDataCode2dObjects</span><span data-if="com" style="display:none">GetDataCode2dObjects</span><span data-if="dotnet" style="display:none">GetDataCode2dObjects</span><span data-if="python" style="display:none">get_data_code_2d_objects</span></code>.
In addition, in <a href="#CandidateHandle"><i><code><span data-if="hdevelop" style="display:inline">CandidateHandle</span><span data-if="c" style="display:none">CandidateHandle</span><span data-if="cpp" style="display:none">CandidateHandle</span><span data-if="com" style="display:none">CandidateHandle</span><span data-if="dotnet" style="display:none">candidateHandle</span><span data-if="python" style="display:none">candidate_handle</span></code></i></a> a handle of a result
or candidate structure or a string identifying a group of candidates
(see <a href="get_data_code_2d_results.html"><code><span data-if="hdevelop" style="display:inline">get_data_code_2d_results</span><span data-if="c" style="display:none">get_data_code_2d_results</span><span data-if="cpp" style="display:none">GetDataCode2dResults</span><span data-if="com" style="display:none">GetDataCode2dResults</span><span data-if="dotnet" style="display:none">GetDataCode2dResults</span><span data-if="python" style="display:none">get_data_code_2d_results</span></code></a>) must be passed.
These handles are returned by <a href="find_data_code_2d.html"><code><span data-if="hdevelop" style="display:inline">find_data_code_2d</span><span data-if="c" style="display:none">find_data_code_2d</span><span data-if="cpp" style="display:none">FindDataCode2d</span><span data-if="com" style="display:none">FindDataCode2d</span><span data-if="dotnet" style="display:none">FindDataCode2d</span><span data-if="python" style="display:none">find_data_code_2d</span></code></a> for all
successfully decoded symbols and by <a href="get_data_code_2d_results.html"><code><span data-if="hdevelop" style="display:inline">get_data_code_2d_results</span><span data-if="c" style="display:none">get_data_code_2d_results</span><span data-if="cpp" style="display:none">GetDataCode2dResults</span><span data-if="com" style="display:none">GetDataCode2dResults</span><span data-if="dotnet" style="display:none">GetDataCode2dResults</span><span data-if="python" style="display:none">get_data_code_2d_results</span></code></a>
for a group of candidates.
If these operators return several handles in a tuple, the individual
handles can be accessed by normal tuple operations.
</p>
<p>For an explanation of the concept of the 2D data code reader
see the introduction of chapter <a href="toc_identification_datacode.html">Identification / Data Code</a>.
</p>
<p>If <i><span data-if="hdevelop" style="display:inline">'discard_undecoded_candidates'</span><span data-if="c" style="display:none">"discard_undecoded_candidates"</span><span data-if="cpp" style="display:none">"discard_undecoded_candidates"</span><span data-if="com" style="display:none">"discard_undecoded_candidates"</span><span data-if="dotnet" style="display:none">"discard_undecoded_candidates"</span><span data-if="python" style="display:none">"discard_undecoded_candidates"</span></i> was set to <i><span data-if="hdevelop" style="display:inline">'yes'</span><span data-if="c" style="display:none">"yes"</span><span data-if="cpp" style="display:none">"yes"</span><span data-if="com" style="display:none">"yes"</span><span data-if="dotnet" style="display:none">"yes"</span><span data-if="python" style="display:none">"yes"</span></i>
with <a href="set_data_code_2d_param.html"><code><span data-if="hdevelop" style="display:inline">set_data_code_2d_param</span><span data-if="c" style="display:none">set_data_code_2d_param</span><span data-if="cpp" style="display:none">SetDataCode2dParam</span><span data-if="com" style="display:none">SetDataCode2dParam</span><span data-if="dotnet" style="display:none">SetDataCode2dParam</span><span data-if="python" style="display:none">set_data_code_2d_param</span></code></a>, only results of successfully
decoded candidates can be accessed.
</p>
<p>Some objects are not accessible without setting the model parameter
<i><span data-if="hdevelop" style="display:inline">'persistence'</span><span data-if="c" style="display:none">"persistence"</span><span data-if="cpp" style="display:none">"persistence"</span><span data-if="com" style="display:none">"persistence"</span><span data-if="dotnet" style="display:none">"persistence"</span><span data-if="python" style="display:none">"persistence"</span></i> to <i>1</i> (see
<a href="set_data_code_2d_param.html"><code><span data-if="hdevelop" style="display:inline">set_data_code_2d_param</span><span data-if="c" style="display:none">set_data_code_2d_param</span><span data-if="cpp" style="display:none">SetDataCode2dParam</span><span data-if="com" style="display:none">SetDataCode2dParam</span><span data-if="dotnet" style="display:none">SetDataCode2dParam</span><span data-if="python" style="display:none">set_data_code_2d_param</span></code></a>).
The persistence must be set before calling
<a href="find_data_code_2d.html"><code><span data-if="hdevelop" style="display:inline">find_data_code_2d</span><span data-if="c" style="display:none">find_data_code_2d</span><span data-if="cpp" style="display:none">FindDataCode2d</span><span data-if="com" style="display:none">FindDataCode2d</span><span data-if="dotnet" style="display:none">FindDataCode2d</span><span data-if="python" style="display:none">find_data_code_2d</span></code></a>, either while creating the model with
<a href="create_data_code_2d_model.html"><code><span data-if="hdevelop" style="display:inline">create_data_code_2d_model</span><span data-if="c" style="display:none">create_data_code_2d_model</span><span data-if="cpp" style="display:none">CreateDataCode2dModel</span><span data-if="com" style="display:none">CreateDataCode2dModel</span><span data-if="dotnet" style="display:none">CreateDataCode2dModel</span><span data-if="python" style="display:none">create_data_code_2d_model</span></code></a> or with
<a href="set_data_code_2d_param.html"><code><span data-if="hdevelop" style="display:inline">set_data_code_2d_param</span><span data-if="c" style="display:none">set_data_code_2d_param</span><span data-if="cpp" style="display:none">SetDataCode2dParam</span><span data-if="com" style="display:none">SetDataCode2dParam</span><span data-if="dotnet" style="display:none">SetDataCode2dParam</span><span data-if="python" style="display:none">set_data_code_2d_param</span></code></a>.
</p>
<p>Currently, the following iconic objects can be retrieved:
</p>
<p><b>Regions of the modules</b>
</p>
<ul>
<li>
<p> All data code types:
</p>
<dl class="generic">


<dt><b><i><span data-if="hdevelop" style="display:inline">'module_1_rois'</span><span data-if="c" style="display:none">"module_1_rois"</span><span data-if="cpp" style="display:none">"module_1_rois"</span><span data-if="com" style="display:none">"module_1_rois"</span><span data-if="dotnet" style="display:none">"module_1_rois"</span><span data-if="python" style="display:none">"module_1_rois"</span></i>:</b></dt>
<dd>
<p>

All modules that were classified as foreground (set).
</p>
</dd>
</dl>

</li>
<li>
<p> All data code types except DotCode:
</p>
<dl class="generic">

<dt><b><i><span data-if="hdevelop" style="display:inline">'module_0_rois'</span><span data-if="c" style="display:none">"module_0_rois"</span><span data-if="cpp" style="display:none">"module_0_rois"</span><span data-if="com" style="display:none">"module_0_rois"</span><span data-if="dotnet" style="display:none">"module_0_rois"</span><span data-if="python" style="display:none">"module_0_rois"</span></i>:</b></dt>
<dd>
<p>

All modules that were classified as background (not set).
</p>
</dd>
</dl>
</li>
</ul>
<p>These region arrays correspond to the areas that were used for the
classification.
The returned object is a region array.
Hence it cannot be requested for a group of candidates.
Therefore, a single result handle must be passed in
<a href="#CandidateHandle"><i><code><span data-if="hdevelop" style="display:inline">CandidateHandle</span><span data-if="c" style="display:none">CandidateHandle</span><span data-if="cpp" style="display:none">CandidateHandle</span><span data-if="com" style="display:none">CandidateHandle</span><span data-if="dotnet" style="display:none">candidateHandle</span><span data-if="python" style="display:none">candidate_handle</span></code></i></a>.
The model persistence must be <i>1</i> for this object.
In addition, requesting the module ROIs makes sense only for symbols
that were detected as valid symbols.
For other candidates, whose processing was aborted earlier, the
module ROIs are not available.
</p>
<p><b>XLD contour</b>
</p>
<dl class="generic">


<dt><b><i><span data-if="hdevelop" style="display:inline">'candidate_xld'</span><span data-if="c" style="display:none">"candidate_xld"</span><span data-if="cpp" style="display:none">"candidate_xld"</span><span data-if="com" style="display:none">"candidate_xld"</span><span data-if="dotnet" style="display:none">"candidate_xld"</span><span data-if="python" style="display:none">"candidate_xld"</span></i>:</b></dt>
<dd>
<p>

An XLD contour that surrounds the candidate or decoded symbol.
</p>
</dd>
</dl>
<p>This object can be requested for any group of results or for any
single candidate or symbol handle.
The persistence setting is of no relevance.
</p>
<p><b>Pyramid images</b>
</p>
<dl class="generic">


<dt><b><i><span data-if="hdevelop" style="display:inline">'search_image'</span><span data-if="c" style="display:none">"search_image"</span><span data-if="cpp" style="display:none">"search_image"</span><span data-if="com" style="display:none">"search_image"</span><span data-if="dotnet" style="display:none">"search_image"</span><span data-if="python" style="display:none">"search_image"</span></i>:</b></dt>
<dd>
<p>

Pyramid image, in which the candidate was found.
</p>
</dd>

<dt><b><i><span data-if="hdevelop" style="display:inline">'process_image'</span><span data-if="c" style="display:none">"process_image"</span><span data-if="cpp" style="display:none">"process_image"</span><span data-if="com" style="display:none">"process_image"</span><span data-if="dotnet" style="display:none">"process_image"</span><span data-if="python" style="display:none">"process_image"</span></i>:</b></dt>
<dd>
<p>

Pyramid image, in which the candidate was investigated more closely.
</p>
</dd>
</dl>
<p>The persistence setting is also not relevant here.
</p>
<h2 id="sec_execution">运行信息</h2>
<ul>
  <li>多线程类型:可重入(与非独占操作符并行运行)。</li>
<li>多线程作用域:全局(可以从任何线程调用)。</li>
  <li>未经并行化处理。</li>
</ul>
<h2 id="sec_parameters">参数表</h2>
  <div class="par">
<div class="parhead">
<span id="DataCodeObjects" class="parname"><b><code><span data-if="hdevelop" style="display:inline">DataCodeObjects</span><span data-if="c" style="display:none">DataCodeObjects</span><span data-if="cpp" style="display:none">DataCodeObjects</span><span data-if="com" style="display:none">DataCodeObjects</span><span data-if="dotnet" style="display:none">dataCodeObjects</span><span data-if="python" style="display:none">data_code_objects</span></code></b> (output_object)  </span><span>object(-array) <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HObject.html">HObject</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HObject.html">HObject</a></span><span data-if="c" style="display:none">Hobject *</span></span>
</div>
<p class="pardesc">Objects that are created as intermediate results
during the detection or evaluation of 2D data codes.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="DataCodeHandle" class="parname"><b><code><span data-if="hdevelop" style="display:inline">DataCodeHandle</span><span data-if="c" style="display:none">DataCodeHandle</span><span data-if="cpp" style="display:none">DataCodeHandle</span><span data-if="com" style="display:none">DataCodeHandle</span><span data-if="dotnet" style="display:none">dataCodeHandle</span><span data-if="python" style="display:none">data_code_handle</span></code></b> (input_control)  </span><span>datacode_2d <code>→</code> <span data-if="dotnet" style="display:none"><a href="HDataCode2D.html">HDataCode2D</a>, </span><span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">HHandle</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (handle)</span><span data-if="dotnet" style="display:none"> (<i>IntPtr</i>)</span><span data-if="cpp" style="display:none"> (<i>HHandle</i>)</span><span data-if="c" style="display:none"> (<i>handle</i>)</span></span>
</div>
<p class="pardesc">Handle of the 2D data code model.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="CandidateHandle" class="parname"><b><code><span data-if="hdevelop" style="display:inline">CandidateHandle</span><span data-if="c" style="display:none">CandidateHandle</span><span data-if="cpp" style="display:none">CandidateHandle</span><span data-if="com" style="display:none">CandidateHandle</span><span data-if="dotnet" style="display:none">candidateHandle</span><span data-if="python" style="display:none">candidate_handle</span></code></b> (input_control)  </span><span>integer <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Union[int, str]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer / </span><span data-if="hdevelop" style="display:inline">string)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">string)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i> / </span><span data-if="cpp" style="display:none">HString)</span><span data-if="c" style="display:none"> (<i>Hlong</i> / </span><span data-if="c" style="display:none">char*)</span></span>
</div>
<p class="pardesc">Handle of the 2D data code candidate. Either an integer
(usually the ResultHandle of <a href="find_data_code_2d.html"><code><span data-if="hdevelop" style="display:inline">find_data_code_2d</span><span data-if="c" style="display:none">find_data_code_2d</span><span data-if="cpp" style="display:none">FindDataCode2d</span><span data-if="com" style="display:none">FindDataCode2d</span><span data-if="dotnet" style="display:none">FindDataCode2d</span><span data-if="python" style="display:none">find_data_code_2d</span></code></a>) or
a string representing a group of candidates.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'all_candidates'</span>
    <span data-if="c" style="display:none">"all_candidates"</span>
    <span data-if="cpp" style="display:none">"all_candidates"</span>
    <span data-if="com" style="display:none">"all_candidates"</span>
    <span data-if="dotnet" style="display:none">"all_candidates"</span>
    <span data-if="python" style="display:none">"all_candidates"</span>
</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>0, 1, 2, <span data-if="hdevelop" style="display:inline">'all_candidates'</span><span data-if="c" style="display:none">"all_candidates"</span><span data-if="cpp" style="display:none">"all_candidates"</span><span data-if="com" style="display:none">"all_candidates"</span><span data-if="dotnet" style="display:none">"all_candidates"</span><span data-if="python" style="display:none">"all_candidates"</span>, <span data-if="hdevelop" style="display:inline">'all_results'</span><span data-if="c" style="display:none">"all_results"</span><span data-if="cpp" style="display:none">"all_results"</span><span data-if="com" style="display:none">"all_results"</span><span data-if="dotnet" style="display:none">"all_results"</span><span data-if="python" style="display:none">"all_results"</span>, <span data-if="hdevelop" style="display:inline">'all_undecoded'</span><span data-if="c" style="display:none">"all_undecoded"</span><span data-if="cpp" style="display:none">"all_undecoded"</span><span data-if="com" style="display:none">"all_undecoded"</span><span data-if="dotnet" style="display:none">"all_undecoded"</span><span data-if="python" style="display:none">"all_undecoded"</span>, <span data-if="hdevelop" style="display:inline">'all_aborted'</span><span data-if="c" style="display:none">"all_aborted"</span><span data-if="cpp" style="display:none">"all_aborted"</span><span data-if="com" style="display:none">"all_aborted"</span><span data-if="dotnet" style="display:none">"all_aborted"</span><span data-if="python" style="display:none">"all_aborted"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="ObjectName" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ObjectName</span><span data-if="c" style="display:none">ObjectName</span><span data-if="cpp" style="display:none">ObjectName</span><span data-if="com" style="display:none">ObjectName</span><span data-if="dotnet" style="display:none">objectName</span><span data-if="python" style="display:none">object_name</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Name of the iconic object to return.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'candidate_xld'</span>
    <span data-if="c" style="display:none">"candidate_xld"</span>
    <span data-if="cpp" style="display:none">"candidate_xld"</span>
    <span data-if="com" style="display:none">"candidate_xld"</span>
    <span data-if="dotnet" style="display:none">"candidate_xld"</span>
    <span data-if="python" style="display:none">"candidate_xld"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'candidate_xld'</span><span data-if="c" style="display:none">"candidate_xld"</span><span data-if="cpp" style="display:none">"candidate_xld"</span><span data-if="com" style="display:none">"candidate_xld"</span><span data-if="dotnet" style="display:none">"candidate_xld"</span><span data-if="python" style="display:none">"candidate_xld"</span>, <span data-if="hdevelop" style="display:inline">'module_0_rois'</span><span data-if="c" style="display:none">"module_0_rois"</span><span data-if="cpp" style="display:none">"module_0_rois"</span><span data-if="com" style="display:none">"module_0_rois"</span><span data-if="dotnet" style="display:none">"module_0_rois"</span><span data-if="python" style="display:none">"module_0_rois"</span>, <span data-if="hdevelop" style="display:inline">'module_1_rois'</span><span data-if="c" style="display:none">"module_1_rois"</span><span data-if="cpp" style="display:none">"module_1_rois"</span><span data-if="com" style="display:none">"module_1_rois"</span><span data-if="dotnet" style="display:none">"module_1_rois"</span><span data-if="python" style="display:none">"module_1_rois"</span>, <span data-if="hdevelop" style="display:inline">'process_image'</span><span data-if="c" style="display:none">"process_image"</span><span data-if="cpp" style="display:none">"process_image"</span><span data-if="com" style="display:none">"process_image"</span><span data-if="dotnet" style="display:none">"process_image"</span><span data-if="python" style="display:none">"process_image"</span>, <span data-if="hdevelop" style="display:inline">'search_image'</span><span data-if="c" style="display:none">"search_image"</span><span data-if="cpp" style="display:none">"search_image"</span><span data-if="com" style="display:none">"search_image"</span><span data-if="dotnet" style="display:none">"search_image"</span><span data-if="python" style="display:none">"search_image"</span></p>
</div>
<h2 id="sec_example_all">例程 (HDevelop)</h2>
<pre class="example">
* Example demonstrating how to access the iconic objects of the data code
* search.

* Create a model for reading Data matrix ECC 200 codes
create_data_code_2d_model ('Data Matrix ECC 200', [], [], DataCodeHandle)
set_data_code_2d_param (DataCodeHandle, 'default_parameters', \
                        'maximum_recognition')
set_data_code_2d_param (DataCodeHandle, 'persistence', 1)
* Read an image
read_image (Image, 'datacode/ecc200/ecc200_disturbed_012')
* Read the symbol in the image
find_data_code_2d (Image, SymbolXLDs, DataCodeHandle, [], [], \
                   ResultHandles, DecodedDataStrings)

* Get the handles of all candidates that were detected as a symbol but
* could not be read
get_data_code_2d_results (DataCodeHandle, 'all_undecoded', 'handle', \
                          HandlesUndecoded)

* For every undecoded symbol, get the contour and the classified
* module regions
for I := 0 to |HandlesUndecoded| - 1 by 1
  * Display image.
  dev_display (Image)
  dev_set_draw ('margin')
  * Get the contour of the symbol.
  dev_set_color ('blue')
  get_data_code_2d_objects (SymbolXLD, DataCodeHandle, \
                            HandlesUndecoded[I], 'candidate_xld')
  dev_display (SymbolXLD)
  * Get the module regions of the foreground modules
  dev_set_color ('green')
  get_data_code_2d_objects (ModuleFG, DataCodeHandle, \
                            HandlesUndecoded[I], 'module_1_rois')
  dev_display (ModuleFG)
  * Get the module regions of the background modules
  dev_set_color ('red')
  get_data_code_2d_objects (ModuleBG, DataCodeHandle, \
                            HandlesUndecoded[I], 'module_0_rois')
  dev_display (ModuleBG)
  * Stop for inspecting the image.
  stop ()
endfor

* Clear the model
clear_data_code_2d_model (DataCodeHandle)
</pre>
<h2 id="sec_result">结果</h2>
<p>该算子 <code><span data-if="hdevelop" style="display:inline">get_data_code_2d_objects</span><span data-if="c" style="display:none">get_data_code_2d_objects</span><span data-if="cpp" style="display:none">GetDataCode2dObjects</span><span data-if="com" style="display:none">GetDataCode2dObjects</span><span data-if="dotnet" style="display:none">GetDataCode2dObjects</span><span data-if="python" style="display:none">get_data_code_2d_objects</span></code> 返回值 <TT>2</TT> (
      <TT>H_MSG_TRUE</TT>)
    
if the given parameters are correct and the requested objects are
available for the last symbol search.
Otherwise, an exception is raised.</p>
<h2 id="sec_predecessors">可能的前置算子</h2>
<p>
<code><a href="find_data_code_2d.html"><span data-if="hdevelop" style="display:inline">find_data_code_2d</span><span data-if="c" style="display:none">find_data_code_2d</span><span data-if="cpp" style="display:none">FindDataCode2d</span><span data-if="com" style="display:none">FindDataCode2d</span><span data-if="dotnet" style="display:none">FindDataCode2d</span><span data-if="python" style="display:none">find_data_code_2d</span></a></code>, 
<code><a href="query_data_code_2d_params.html"><span data-if="hdevelop" style="display:inline">query_data_code_2d_params</span><span data-if="c" style="display:none">query_data_code_2d_params</span><span data-if="cpp" style="display:none">QueryDataCode2dParams</span><span data-if="com" style="display:none">QueryDataCode2dParams</span><span data-if="dotnet" style="display:none">QueryDataCode2dParams</span><span data-if="python" style="display:none">query_data_code_2d_params</span></a></code>
</p>
<h2 id="sec_successors">可能的后置算子</h2>
<p>
<code><a href="get_data_code_2d_results.html"><span data-if="hdevelop" style="display:inline">get_data_code_2d_results</span><span data-if="c" style="display:none">get_data_code_2d_results</span><span data-if="cpp" style="display:none">GetDataCode2dResults</span><span data-if="com" style="display:none">GetDataCode2dResults</span><span data-if="dotnet" style="display:none">GetDataCode2dResults</span><span data-if="python" style="display:none">get_data_code_2d_results</span></a></code>
</p>
<h2 id="sec_see">参考其它</h2>
<p>
<code><a href="query_data_code_2d_params.html"><span data-if="hdevelop" style="display:inline">query_data_code_2d_params</span><span data-if="c" style="display:none">query_data_code_2d_params</span><span data-if="cpp" style="display:none">QueryDataCode2dParams</span><span data-if="com" style="display:none">QueryDataCode2dParams</span><span data-if="dotnet" style="display:none">QueryDataCode2dParams</span><span data-if="python" style="display:none">query_data_code_2d_params</span></a></code>, 
<code><a href="get_data_code_2d_results.html"><span data-if="hdevelop" style="display:inline">get_data_code_2d_results</span><span data-if="c" style="display:none">get_data_code_2d_results</span><span data-if="cpp" style="display:none">GetDataCode2dResults</span><span data-if="com" style="display:none">GetDataCode2dResults</span><span data-if="dotnet" style="display:none">GetDataCode2dResults</span><span data-if="python" style="display:none">get_data_code_2d_results</span></a></code>, 
<code><a href="get_data_code_2d_param.html"><span data-if="hdevelop" style="display:inline">get_data_code_2d_param</span><span data-if="c" style="display:none">get_data_code_2d_param</span><span data-if="cpp" style="display:none">GetDataCode2dParam</span><span data-if="com" style="display:none">GetDataCode2dParam</span><span data-if="dotnet" style="display:none">GetDataCode2dParam</span><span data-if="python" style="display:none">get_data_code_2d_param</span></a></code>, 
<code><a href="set_data_code_2d_param.html"><span data-if="hdevelop" style="display:inline">set_data_code_2d_param</span><span data-if="c" style="display:none">set_data_code_2d_param</span><span data-if="cpp" style="display:none">SetDataCode2dParam</span><span data-if="com" style="display:none">SetDataCode2dParam</span><span data-if="dotnet" style="display:none">SetDataCode2dParam</span><span data-if="python" style="display:none">set_data_code_2d_param</span></a></code>
</p>
<h2 id="sec_module">模块</h2>
<p>
Data Code</p>
<!--OP_REF_FOOTER_START-->
<hr>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<div class="footer">
<div class="copyright">HALCON算子参考手册 Copyright © 2015-2023 51Halcon</div>
</div>
</div>
</body>
</html>
